/*   1:    */ package org.intellij.lang.regexp;
/*   2:    */ 
/*   3:    */

import com.intellij.openapi.util.text.StringUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

/*   4:    */
/*   5:    */
/*   6:    */ 
/*   7:    */ public final class DefaultRegExpPropertiesProvider
/*   8:    */ {
/*   9:  8 */   private static final DefaultRegExpPropertiesProvider a = new DefaultRegExpPropertiesProvider();
/*  10:    */   
/*  11:    */   public static DefaultRegExpPropertiesProvider getInstance()
/*  12:    */   {
/*  13: 11 */     return a;
/*  14:    */   }
/*  15:    */   
/*  16: 14 */   private final String[][] b = { { "Cn", "UNASSIGNED" }, { "Lu", "UPPERCASE_LETTER" }, { "Ll", "LOWERCASE_LETTER" }, { "Lt", "TITLECASE_LETTER" }, { "Lm", "MODIFIER_LETTER" }, { "Lo", "OTHER_LETTER" }, { "Mn", "NON_SPACING_MARK" }, { "Me", "ENCLOSING_MARK" }, { "Mc", "COMBINING_SPACING_MARK" }, { "Nd", "DECIMAL_DIGIT_NUMBER" }, { "Nl", "LETTER_NUMBER" }, { "No", "OTHER_NUMBER" }, { "Zs", "SPACE_SEPARATOR" }, { "Zl", "LINE_SEPARATOR" }, { "Zp", "PARAGRAPH_SEPARATOR" }, { "Cc", "CNTRL" }, { "Cf", "FORMAT" }, { "Co", "PRIVATE USE" }, { "Cs", "SURROGATE" }, { "Pd", "DASH_PUNCTUATION" }, { "Ps", "START_PUNCTUATION" }, { "Pe", "END_PUNCTUATION" }, { "Pc", "CONNECTOR_PUNCTUATION" }, { "Po", "OTHER_PUNCTUATION" }, { "Sm", "MATH_SYMBOL" }, { "Sc", "CURRENCY_SYMBOL" }, { "Sk", "MODIFIER_SYMBOL" }, { "So", "OTHER_SYMBOL" }, { "L", "LETTER" }, { "M", "MARK" }, { "N", "NUMBER" }, { "Z", "SEPARATOR" }, { "C", "CONTROL" }, { "P", "PUNCTUATION" }, { "S", "SYMBOL" }, { "LD", "LETTER_OR_DIGIT" }, { "L1", "Latin-1" }, { "all", "ALL" }, { "ASCII", "ASCII" }, { "Alnum", "Alphanumeric characters" }, { "Alpha", "Alphabetic characters" }, { "Blank", "Space and tab characters" }, { "Cntrl", "Control characters" }, { "Digit", "Numeric characters" }, { "Graph", "printable and visible" }, { "Lower", "Lower-case alphabetic" }, { "Print", "Printable characters" }, { "Punct", "Punctuation characters" }, { "Space", "Space characters" }, { "Upper", "Upper-case alphabetic" }, { "XDigit", "hexadecimal digits" }, { "javaLowerCase" }, { "javaUpperCase" }, { "javaTitleCase" }, { "javaDigit" }, { "javaDefined" }, { "javaLetter" }, { "javaLetterOrDigit" }, { "javaJavaIdentifierStart" }, { "javaJavaIdentifierPart" }, { "javaUnicodeIdentifierStart" }, { "javaUnicodeIdentifierPart" }, { "javaIdentifierIgnorable" }, { "javaSpaceChar" }, { "javaWhitespace" }, { "javaISOControl" }, { "javaMirrored" } };
/*  17: 84 */   private final String[][] c = { { "d", "digit: [0-9]" }, { "D", "nondigit: [^0-9]" }, { "s", "whitespace [ \\t\\n\\x0B\\f\\r]" }, { "S", "non-whitespace [^\\s]" }, { "w", "word character [a-zA-Z_0-9]" }, { "W", "nonword character [^\\w]" }, { "b", "word boundary" }, { "B", "non-word boundary" }, { "A", "beginning of the input" }, { "G", "end of the previous match" }, { "Z", "end of the input but for the final terminator, if any" }, { "z", "end of input" }, { "Q", "Nothing, but quotes all characters until \\E" }, { "E", " \tNothing, but ends quoting started by \\Q" }, { "t", "tab character ('\\u0009')" }, { "n", "newline (line feed) character ('\\u000A')" }, { "r", "carriage-return character ('\\u000D')" }, { "f", "form-feed character ('\\u000C')" }, { "a", "alert (bell) character ('\\u0007')" }, { "e", "escape character ('\\u001B')" } };
/*  18:    */   
/*  19:    */   public boolean isValidCategory(@NotNull String paramString)
/*  20:    */   {
/*  21:111 */     if (paramString == null) {
/*  22:111 */       throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "0", "org/intellij/lang/regexp/DefaultRegExpPropertiesProvider", "isValidCategory" }));
/*  23:    */     }
/*  24:111 */     if (paramString.startsWith("In")) {
/*  25:    */       try
/*  26:    */       {
/*  27:113 */         return Character.UnicodeBlock.forName(paramString.substring(2)) != null;
/*  28:    */       }
/*  29:    */       catch (IllegalArgumentException localIllegalArgumentException)
/*  30:    */       {
/*  31:115 */         return false;
/*  32:    */       }
/*  33:    */     }
/*  34:118 */     if (paramString.startsWith("Is")) {
/*  35:119 */       paramString = paramString.substring(2);
/*  36:    */     }
/*  37:121 */     for (String[] arrayOfString1 : this.b) {
/*  38:122 */       if (arrayOfString1[0].equals(paramString)) {
/*  39:123 */         return true;
/*  40:    */       }
/*  41:    */     }
/*  42:126 */     return false;
/*  43:    */   }
/*  44:    */   
/*  45:    */   @Nullable
/*  46:    */   public String getPropertyDescription(@Nullable String paramString)
/*  47:    */   {
/*  48:131 */     if (StringUtil.isEmptyOrSpaces(paramString)) {
/*  49:132 */       return null;
/*  50:    */     }
/*  51:134 */     for (String[] arrayOfString1 : this.b) {
/*  52:135 */       if (arrayOfString1[0].equals(paramString)) {
/*  53:136 */         return arrayOfString1.length > 1 ? arrayOfString1[1] : arrayOfString1[0];
/*  54:    */       }
/*  55:    */     }
/*  56:139 */     return null;
/*  57:    */   }
/*  58:    */   
/*  59:    */   @NotNull
/*  60:    */   public String[][] getAllKnownProperties()
/*  61:    */   {
/*  62:144 */     String[][] tmp4_1 = this.b;
/*  63:144 */     if (tmp4_1 == null) {
/*  64:144 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/DefaultRegExpPropertiesProvider", "getAllKnownProperties" }));
/*  65:    */     }
/*  66:144 */     return tmp4_1;
/*  67:    */   }
/*  68:    */   
/*  69:    */   @NotNull
/*  70:    */   public String[][] getKnownCharacterClasses()
/*  71:    */   {
/*  72:149 */     String[][] tmp4_1 = this.c;
/*  73:149 */     if (tmp4_1 == null) {
/*  74:149 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/DefaultRegExpPropertiesProvider", "getKnownCharacterClasses" }));
/*  75:    */     }
/*  76:149 */     return tmp4_1;
/*  77:    */   }
/*  78:    */ }



/* Location:           E:\idea\

 * Qualified Name:     org.intellij.lang.regexp.DefaultRegExpPropertiesProvider

 * JD-Core Version:    0.7.0.1

 */